﻿<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ad="clr-namespace:AvalonDock">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/AvalonDock;component/Resources/Brushes.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    
    <ContextMenu
		     x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type ad:DockingManager}, ResourceId={x:Static ad:ContextMenuElement.DockableFloatingWindow}}">
        <MenuItem Command="ad:ManagedContentCommands.Show"/>
        <MenuItem Command="ad:ManagedContentCommands.Hide"/>
        <MenuItem Command="ad:DockableContentCommands.ShowAsDocument"/>
        <Separator/>
        <MenuItem Command="ad:DockableFloatingWindowCommands.SetAsFloatingWindow"/>
        <MenuItem Command="ad:DockableFloatingWindowCommands.SetAsDockableWindow"/>
    </ContextMenu>

    <ContextMenu
		     x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type ad:DockingManager}, ResourceId={x:Static ad:ContextMenuElement.DocumentFloatingWindow}}">
        <MenuItem Command="ad:ManagedContentCommands.Close"/>
        <Separator/>
        <MenuItem Command="ad:DocumentContentCommands.FloatingDocument"/>
        <MenuItem Command="ad:DocumentContentCommands.TabbedDocument"/>
    </ContextMenu>
    
    <!--Resizer-->
    <Style x:Key="{x:Type ad:Resizer}" TargetType="{x:Type ad:Resizer}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ad:Resizer}">
                    <Border Background="{TemplateBinding Background}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--PaneHeaderCommandStyle-->
    <Style x:Key="PaneHeaderCommandStyle" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border 
						x:Name="PaneHeaderCommandIntBorder" 
						Background="Transparent"
						BorderThickness="1"
						Margin="0"
						Opacity="0.8">
                        <ContentPresenter/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="BorderBrush" 
								TargetName="PaneHeaderCommandIntBorder"
								Value="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.PaneHeaderCommandBorderBrush}}}"/>
                            <Setter Property="Background" 
								TargetName="PaneHeaderCommandIntBorder"
								Value="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.PaneHeaderCommandBackground}}}"/>
                            <Setter Property="Opacity" 
								TargetName="PaneHeaderCommandIntBorder"
								Value="1"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--PaneHeaderContextMenuCommandStyle-->
    <Style x:Key="PaneHeaderContextMenuCommandStyle" 
           TargetType="{x:Type Border}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="BorderBrush" 
								Value="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.PaneHeaderCommandBorderBrush}}}"/>
                <Setter Property="Background" 
								Value="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.PaneHeaderCommandBackground}}}"/>
                <Setter Property="Opacity" 
								Value="1"/>
            </Trigger>
        </Style.Triggers>



    </Style>
    
</ResourceDictionary>